package com.tm.d23_interface_demo;

import java.util.ArrayList;

/**
 * 2024/5/20 班级管理类 Cjj 15：46
 */
public class ClassManager {
     private ArrayList<Student> students=new ArrayList<>();
     private StudentOperator studentOperator=new StudentOperatorImpl2();
    public ClassManager(){
        students.add(new Student("张三",'男',90));
        students.add(new Student("古力娜扎",'女',100));
        students.add(new Student("小明",'男',80));
        students.add(new Student("安达充",'男',60));
    }

    //打印全班全部学生的信息
    public void printInfo(){
        studentOperator.printAllInfo(students);
    }

    //打印全部学生的平均分
    public void printScore(){
     studentOperator.printAverageScore(students);
    }
}
